package com.markedquilt.service.impl;
/*
 * PackageName: com.markedquilt.service.impl
 * Author:   coke
 * Date:     Created in 2020/10/25 12:56
 * Description:
 * History:
 * <author>        <time>             <version>          <desc>
 * 作者姓名         修改时间            版本号              描述
 * coke           2020/10/25 12:56     1.0
 */

import com.markedquilt.mapper.AccountMapper;
import com.markedquilt.pojo.Account;
import com.markedquilt.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author ZhangKe
 * @Description
 * @date 2020/10/25 12:56.
 */
@Service
@Transactional
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public List<Account> queryAccountList() throws Exception {
        return accountMapper.queryAccountList();
    }

    @Override
    public void deleteByName(String name) {
        accountMapper.deleteByName(name);
    }

    @Override
    public void insertAccount(Account account) {
        accountMapper.insert(account);
    }

    @Override
    public void updateAccount(Account account) {
        accountMapper.update(account);
    }
}
